/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.hl7.v3;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Sahaptian</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * <!-- begin-model-doc -->
 * abstDomain: A18500 (C-0-T18130-A18413-A18498-A18500-cpt)
 * <!-- end-model-doc -->
 * @see org.hl7.v3.V3Package#getSahaptian()
 * @model extendedMetaData="name='Sahaptian'"
 * @generated
 */
public enum Sahaptian implements Enumerator {
	/**
	 * The '<em><b>XWAR</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #XWAR_VALUE
	 * @generated
	 * @ordered
	 */
	XWAR(0, "xWAR", "x-WAR"),

	/**
	 * The '<em><b>XUMA</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #XUMA_VALUE
	 * @generated
	 * @ordered
	 */
	XUMA(1, "xUMA", "x-UMA"),

	/**
	 * The '<em><b>XWAA</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #XWAA_VALUE
	 * @generated
	 * @ordered
	 */
	XWAA(2, "xWAA", "x-WAA"),

	/**
	 * The '<em><b>XYAK</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #XYAK_VALUE
	 * @generated
	 * @ordered
	 */
	XYAK(3, "xYAK", "x-YAK");

	/**
	 * The '<em><b>XWAR</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>XWAR</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #XWAR
	 * @model name="xWAR" literal="x-WAR"
	 * @generated
	 * @ordered
	 */
	public static final int XWAR_VALUE = 0;

	/**
	 * The '<em><b>XUMA</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>XUMA</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #XUMA
	 * @model name="xUMA" literal="x-UMA"
	 * @generated
	 * @ordered
	 */
	public static final int XUMA_VALUE = 1;

	/**
	 * The '<em><b>XWAA</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>XWAA</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #XWAA
	 * @model name="xWAA" literal="x-WAA"
	 * @generated
	 * @ordered
	 */
	public static final int XWAA_VALUE = 2;

	/**
	 * The '<em><b>XYAK</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>XYAK</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #XYAK
	 * @model name="xYAK" literal="x-YAK"
	 * @generated
	 * @ordered
	 */
	public static final int XYAK_VALUE = 3;

	/**
	 * An array of all the '<em><b>Sahaptian</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final Sahaptian[] VALUES_ARRAY =
		new Sahaptian[] {
			XWAR,
			XUMA,
			XWAA,
			XYAK,
		};

	/**
	 * A public read-only list of all the '<em><b>Sahaptian</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<Sahaptian> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>Sahaptian</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static Sahaptian get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			Sahaptian result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Sahaptian</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static Sahaptian getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			Sahaptian result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Sahaptian</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static Sahaptian get(int value) {
		switch (value) {
			case XWAR_VALUE: return XWAR;
			case XUMA_VALUE: return XUMA;
			case XWAA_VALUE: return XWAA;
			case XYAK_VALUE: return XYAK;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private Sahaptian(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
	  return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
	  return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
	  return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}
	
} //Sahaptian
